HTMLify

style.css
Views: 34 | Author: cody
*,
*:before,
*:after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: #151515;
    font-family: "Open Sans", Helvetica, Arial, sans-serif;
}

.blob-btn {
    z-index: 1;
    position: relative;
    padding: 20px 46px;
    text-align: center;
    text-transform: uppercase;
    color: #ff6895;
    font-size: 16px;
    font-weight: bold;
    background-color: transparent;
    outline: none;
    border: none;
    transition: color 0.5s;
    cursor: pointer;
    border-radius: 30px;
}

.blob-btn::before,
.blob-btn::after {
    position: absolute;
    content: "";
    width: 100%;
    height: 100%;
    border-radius: 30px;
}

.blob-btn::before {
    z-index: 1;
    left: 0;
    top: 0;
    border: 2px solid #ff6895;
}

.blob-btn::after {
    z-index: -2;
    left: 3px;
    top: 3px;
    transition: all 0.3s 0.2s;
}

.blob-btn:hover {
    color: #ffffff;
    border-radius: 30px;
}

.blob-btn:hover::after {
    transition: all 0.3s;
    left: 0;
    top: 0;
    border-radius: 30px;
}

.blob-btn__inner {
    z-index: -1;
    overflow: hidden;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    border-radius: 30px;
    background: #151515;
}

.blob-btn__blobs {
    position: relative;
    display: block;
    height: 100%;
    filter: url("#splash");
}

.blob-btn__blob {
    position: absolute;
    top: 2px;
    width: 25%;
    height: 100%;
    background: #ff6895;
    border-radius: 100%;
    transform: translate3d(0, 150%, 0) scale(1.7);
    transition: transform 0.45s;
}

@supports (filter: url("#splash")) {
    .blob-btn__blob {
        transform: translate3d(0, 150%, 0) scale(1.4);
    }
}

.blob-btn__blob:nth-child(1) {
    left: 0%;
    transition-delay: 0s;
}

.blob-btn__blob:nth-child(2) {
    left: 30%;
    transition-delay: 0.08s;
}

.blob-btn__blob:nth-child(3) {
    left: 60%;
    transition-delay: 0.16s;
}

.blob-btn__blob:nth-child(4) {
    left: 90%;
    transition-delay: 0.24s;
}

.blob-btn:hover .blob-btn__blob {
    transform: translateZ(0) scale(1.7);
}

@supports (filter: url("#splash")) {
    .blob-btn:hover .blob-btn__blob {
        transform: translateZ(0) scale(1.4);
    }
}

Comments